package com.younion.common.constants;


public enum CostType {
	
	SCORE("SCORE","积分消费"), CASH("CASH","商品消费"),TIMES("TIMES", "记次消费"),SAVING("SAVING", "储值消费"),FEEDBACK("FEEDBACK", "退货");
	private String name;
	private String title;

	private CostType(String name,String title) {
		this.name = name;
		this.title = title;
	}

	public String getName() {
		return name;
	}
	
	public String getTitle(){
		return title;
	}

	public static CostType valueOfName(String name) {
		for (CostType e : CostType.values()) {
			if (e.getName().equals(name)) {
				return e;
			}
		}
		return null;
	}

	public static void main(String[] args) {
		System.out.print(CostType.valueOfName("*"));
	}
	
}
